import { lazy } from "react";
import { AppstoreOutline, MessageOutline, UserOutline, AppOutline } from 'antd-mobile-icons'
import Login from "../page/login/Login";
// import Home from "../page/home/Home";
import City from "../page/city/City";
import List from "../page/list/List";
import Dateil from "../page/dateil/Dateil";
import Order from "../page/order/Order";
import Xzcpeope from "../page/xzcpeope/Xzcpeope";
import Dttaill from "../dttaill/Dttaill";
import Xz from "../page/xz/Xz";
import Listt from "../page/listt/Listt";
import Cp from "../page/cp/Cp";

let Props = lazy(() => import('../page/props/Props'))
let User = lazy(() => import('../page/user/User'))
let Message = lazy(() => import('../page/message/Message'))
let Myloaiut = lazy(() => import('../page/myloaiut/Myloaiut'))
let Home = lazy(() => import('../page/home/Home'))


export const homeRouter = [
    {
        path: '/',
        element: <Home />,
        title: '首页',
        icon: <AppOutline />


    },
    {
        path: '/props',
        element: <Props />,
        title: '分类',
        icon: <AppstoreOutline />

    },
    {
        path: '/message',
        element: <Message />,
        title: '消息',
        icon: <MessageOutline />

    },
    {
        path: '/user',
        element: <User />,
        title: '个人中心',
        icon: <UserOutline />

    }
]

const router = [
    {
        path: '/',
        element: <Myloaiut />,
        children: homeRouter
    },
    {
        path: '/login',
        element: <Login />,
    },
    {
        path: '/list',
        element: <List />,
    },
      {
        path: '/listt',
        element: <Listt />,
    },
    {
        path: '/dateil',
        element: <Dateil />,
    },
    {
        path: '/cp',
        element: <Cp />,
    },
    {
        path: '/order',
        element: <Order />,
    },
    {
        path: '/xz',
        element: <Xz />,
    },
     {
        path: '/xzcpeope',
        element: <Xzcpeope />,
    },
    {
        path: '/city/:type',
        element: <City />,
    },
     {
        path: '/dttaill',
        element: <Dttaill />,
    },

]

export default router